import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { SysUserDepartService } from './sys_user_depart.service';
import { CreateSysUserDepartDto } from './dto/create-sys_user_depart.dto';
import { UpdateSysUserDepartDto } from './dto/update-sys_user_depart.dto';

@Controller('sys-user-depart')
export class SysUserDepartController {
  constructor(private readonly sysUserDepartService: SysUserDepartService) {}

  @Post()
  create(@Body() createSysUserDepartDto: CreateSysUserDepartDto) {
    return this.sysUserDepartService.create(createSysUserDepartDto);
  }

  @Get()
  findAll() {
    return this.sysUserDepartService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.sysUserDepartService.findOne(id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateSysUserDepartDto: UpdateSysUserDepartDto) {
    return this.sysUserDepartService.update(id, updateSysUserDepartDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.sysUserDepartService.remove(id);
  }
}
